Skip to content

GitHub Issue 954: Add error for duplicate values for parent inputs#7559

Merged
XingY merged 5 commits intodevelopfrom
fb_duplicateParents
Apr 9, 2026
Merged

GitHub Issue 954: Add error for duplicate values for parent inputs#7559
XingY merged 5 commits intodevelopfrom
fb_duplicateParents

Conversation

@XingY
Copy link
Copy Markdown
Contributor

@XingY XingY commented Apr 7, 2026

@XingY XingY requested a review from labkey-susanh April 8, 2026 22:24
{
List<String> valueList = values.toList();
Set<String> valueSet = new HashSet<>();
List<String> duplicates = valueList.stream().filter(s -> !valueSet.add(s)).toList();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The conversion from the stream to the list to the stream and then again to the stream is, uh, unfortunate and kind of defeats one of the purposes of using the stream. I would hope that we don't have a lot of values, of course, so maybe not a big deal (and I don't have a better suggestion).

@XingY XingY merged commit 231fba3 into develop Apr 9, 2026
8 of 10 checks passed
@XingY XingY deleted the fb_duplicateParents branch April 9, 2026 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants